import { createRouter, createWebHistory } from 'vue-router'
import HomeIndex from '@/views/home/Index.vue'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: HomeIndex
  },
  {
    path: '/rescue-cases',
    name: 'RescueCases',
    component: () => import('@/views/rescue/Cases.vue')
  },
  {
    path: '/rescue-cases/dogs',
    name: 'RescueDogsPage',
    component: () => import('@/views/rescue/DogsPage.vue')
  },
  {
    path: '/rescue-cases/cats',
    name: 'RescueCatsPage',
    component: () => import('@/views/rescue/CatsPage.vue')
  },
  {
    path: '/rescue-cases/others',
    name: 'RescueOthersPage',
    component: () => import('@/views/rescue/OthersPage.vue')
  },
  {
    path: '/adoption-cases',
    name: 'AdoptionCases',
    component: () => import('@/views/adoption/Cases.vue')
  },
  {
    path: '/adoption-cases/:id',
    name: 'CaseDetail',
    component: () => import('@/views/adoption/CaseDetail.vue')
  },
  {
    path: '/pet-column',
    name: 'PetColumn',
    component: () => import('@/views/pet/Column.vue')
  },
  {
    path: '/pet-column/knowledge',
    name: 'PetKnowledge',
    component: () => import('@/views/pet/Knowledge.vue')
  },
  {
    path: '/pet-column/news',
    name: 'PetNews',
    component: () => import('@/views/pet/News.vue')
  },
  {
    path: '/pet-column/article/:id',
    name: 'ArticleDetail',
    component: () => import('@/views/pet/ArticleDetail.vue')
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('@/views/about/Index.vue')
  },
  {
    path: '/about/intro',
    name: 'SiteIntro',
    component: () => import('@/views/about/Intro.vue')
  },
  {
    path: '/about/purpose',
    name: 'SitePurpose',
    component: () => import('@/views/about/Purpose.vue')
  },
  {
    path: '/guestbook',
    name: 'Guestbook',
    component: () => import('@/views/contact/Guestbook.vue')
  },
  {
    path: '/contact',
    name: 'Contact',
    component: () => import('@/views/contact/Index.vue')
  },
  {
    path: '/auth',
    name: 'Auth',
    component: () => import('@/views/auth/LoginRegister.vue')
  }
]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
